﻿/* String.format helper */
/* Usage:
    String.format('{0} is dead, but {1} is alive! {0} {2}', 'ASP', 'ASP.NET');
*/

if (!String.format) {
    String.format = function (format) {
        var args = Array.prototype.slice.call(arguments, 1);
        return format.replace(/{(\d+)}/g, function (match, number) {
            return typeof args[number] != 'undefined'
        ? args[number]
        : match
      ;
        });
    };
}
